<?php global $ubi;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>TÙM LUM site</title>
        
		<link rel="stylesheet" type="text/css" href="include/css/style.css" media="screen" />
		<link rel="stylesheet" id="contact-form-7-css" href="include/css/styles.css" type="text/css" media="all" />
        <link rel="stylesheet" type="text/css" href="include/css/site.css" media="screen" />
		<link href="include/css/jquery-ui.css" type="text/css" rel="stylesheet" />
		
		<script language="javascript" src="include/script/jquery-1.4.4.min.js" type="text/javascript"></script>
		<script language="javascript" src="include/script/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript" src="include/script/script.js"></script>
		<script language="javascript" type="text/javascript" src="include/script/validate.js"></script>
		
		<script type="text/javascript" language="javascript">
			$(document).ready(function(){
				$('#randomItemProvider').load('index.php?load&view=randomItemProvider');
				$('#blockSignIn').load('index.php?load&view=blockSignIn');
				$('#blockSearch').load('index.php?load&view=blockSearch');
				$('#blockMembers').load('index.php?load&view=blockMembers');
				$('#blockNewestPosts').load('index.php?load&view=blockNewestPosts');
				$('#mainMenu').load('index.php?load&view=menu');
				$('#footer').load('index.php?load&view=footer');
				
				$('#datepicker').datepicker(
					{dateFormat:'dd/mm/yy', 
					 changeMonth: true,	
					 changeYear: true,
					 yearRange: '1930:2010'});
				});
		</script>
	</head>
    
    <body id="cookoffboard" class="home blog">
		<div id="corners">			
			<div class="header" id="main-head">
				<div id="hdr-info">
                	<div style="float:left">
                        <img id="logo" src="include/imgs/logo.png" alt="The Cook-Off Board" width="235px" />
                        <p id="desc">Tùm Lum, Tả Pí Lù, chia sẻ tất cả ở đây</p>
                    </div>
                    <div class="nav">
                        <div id="mainMenu"></div>
                        <div style="clear:both"></div>
                    </div>
				</div>              
			</div> <!--end header-->
            
			<div class="polaroids">
            	<div class="marginBoxPicCollection" id="randomItemProvider"></div>
			</div> <!--end polaris-->
            
            <div id="container">
				<hr />
                <div class="left">
                    <div class="section" id="content">                    
                        <h1>Cập nhật thông tin thành viên</h1>
                        <form action="index.php?profile&type=personal" method="post" name="profile_form">
	                        <fieldset >
	                        	<h3>Thông tin cá nhân</h3>
	                            <ul class="frm">
	                                <li>
	                                    <label>Họ tên <span class="red">*</span></label>
	                                    <input type="text" name="txtLastName" value="<?php echo $user->getLastName()?>" />
	                                </li>
	                                <li>	
				                    	<label>Tên <span class="red">*</span></label>
				                        <input type="text" name="txtFirstName" value="<?php echo $user->getFirstName()?>" />
				                    </li>
	                                <li>
	                                    <label>Giới Tính</label>
	                                    <select name="selGender">
	                                    	<?php
	                                    		if ($user->getGender() == 0) {
	                                    	?>
		                                    		<option value="1">Nam</option>
		                                        	<option value="0" selected="selected">Nữ</option>	
	                                    	<?php 
	                                    		} else {
	                                    	?>
													<option value="1" selected="selected" >Nam</option>
	                                        		<option value="0">Nữ</option>	                                    	
	                                    	<?php 
	                                    		} 
	                                    	?>
	                                    </select>
	                                </li>   
	                                <li>
	                                    <label>Ngày Sinh <span class="red">*</span></label>
	                                    <input id="datepicker" type="text" name="txtDOB" value="<?php echo date($ubi['SERVER']['DATE_FORMAT'],GeneralFunctions::formatDate($user->getDateOfBirth())) ?>" />
	                                </li>                    
	                                <li>
	                                    <label>Nghề Nghiệp</label>
	                                    <select name="selOccupation">	                        
				                        	<?php	                        		
				                        		for ($i = 0; $i < sizeof($occupationList); $i++) {
				                        			$occupationModel = $occupationList[$i];
				                        			$id = $occupationModel->getOccupationID();
				                        			$name = $occupationModel->getOccupationName();
				                        			if ($user->getOccupationID() == $id) {
				                        				echo "<option value='$id' selected='selected'>$name</option>";
				                        			} else {
				                        				echo "<option value='$id'>$name</option>";
				                        			}
				                        		}
				                        	?>
				                        </select>
	                                </li>
	                                <li>
	                                	<label>&nbsp;</label>
	                                	<input type="submit" value="Cập Nhật"/>
	                                </li>  
	                            </ul>
	                        </fieldset>
						</form>
						<form action="index.php?profile&type=contact" method="post" name="contact_form">
	                        <fieldset>
	                            <h3>Thông tin liên hệ</h3>
	                            <ul class="frm">
	                                <li>
	                                    <label>Điện thoại</label>
	                                    <input type="text" name="txtPhone" value="<?php echo $user->getTelephone()?>"/>
	                                </li>
	                                <li>
	                                    <label>Di động</label>
	                                    <input type="text" name="txtCellPhone" value="<?php echo $user->getCellPhone()?>" />
	                                </li>	                                            
	                                <li>
	                                	<label>Địa chỉ</label>
	                                	<span class="note"><?php echo $address?></span>
	                                </li>
	                            </ul>
	                            <ul class="frm">            
	                                <li>
	                                    <label>Số Nhà</label>
	                                    <input type="text" size="7" name="txtNumber" />
	                                </li>
	                                <li>
	                                	<label>Đường</label>    
	                                    <input type="text" size="20" name="txtStreet" />
	                                </li>
	                                <li>
	                                	<label>Phường</label>    
	                                    <input type="text" size="5" name="txtWard" />
	                                </li>
	                                <li>
	                                	<label>Quận</label>    
	                                    <input type="text" size="10" name="txtDistrict" />
	                                </li>   
	                                <li>
	                                    <label>Tỉnh/Thành</label>
	                                    <select name="selCity">
											<option value="Hồ Chí Minh">Hồ Chí Minh</option>
											<option value="Hà Nội">Hà Nội</option>
										</select>
	                                </li>
	                            </ul>
	                        </fieldset>                      
						</form>	                                  
                    </div>  <!--end section -->
            	</div> <!-- end left -->        
                <div class="right">
        			<div class="aside">
                        <ul>	
                            <li class="blockRight" id="blockSignIn"></li>
                            <li class="blockRight" id="blockSearch"></li>                                            
                            <li class="blockRight" id="blockMembers"></li>
                            <li class="blockRight" id="blockNewestPosts"></li>
                        </ul>
                    </div>        
                </div> <!--end right-->
			</div> <!--end container-->		
            
            <div id="footer" class="footer clearfix"></div>             
		</div>
	</body>
</html>